#!/bin/bash

set -xe

if [ "$#" -ne "2" ]; then
    echo "usage: $0 <env-name> <namespace>"  
    exit 2
fi

KS_WORKSPACE="/usr/local/kubeflow_ks_app"
KS_ENV_NAME=${1}
KS_ENV_NAMESPACE=${2}

cd ${KS_WORKSPACE}

ks delete ${KS_ENV_NAME}

ks env rm ${KS_ENV_NAME}

exit 0